package pojo;

public class GirlStaticFactory
{
    private static   Girl girl = new Girl();

    public static Girl getGirl()
    {
        System.err.println("调用静态方法获取女孩对象");
        return girl;
    }
    public static Girl getGirl(String name,Integer age)
    {
        System.err.println("调用静态方法获取女孩对象");
        girl.setName(name);
        girl.setAge(age);
        return girl;
    }
}
